docs(agentic): document get_pg_capabilities MCP tool (#135253)#133
Conversation
Add an "MCP Tools" section to the developer docs covering the Ottu Core MCP server and its first Agentic-onboarding tool, get_pg_capabilities: - developers/mcp-tools/index.mdx — MCP server overview: Streamable HTTP connection, Bearer auth, per-tool permission model, error envelope. - developers/mcp-tools/pg-capabilities.mdx — full tool reference: the three progressive-disclosure modes (countries / country / gateway) with source-faithful example payloads, response schema (gateway profile, provider, wallet), enum tables, and error responses. - sidebars.ts — new "MCP Tools" category (Overview + PG Capabilities). Examples and payloads are taken verbatim from the core_backend tests so they match the tool's real output (bilingual gateway/wallet names, catalogue country order, gateway.view_pgmid permission gate). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@claude do code review |
|
Claude finished @gergesfikry-ottu's task in 3m 2s —— View job Code Review
Nice addition — first documented MCP tool, and it's thorough. I verified every in-page anchor ( Note: I could not run One correctness/consistency issue and a couple of structural notes against 1.
2. 3. Everything else — permission-gated error handling, the progressive-disclosure "3 modes" structure, the BNPL |
What & why
Documents the newly shipped
get_pg_capabilitiestool on the Ottu Core MCP server, which powers Agentic merchant onboarding — an agent uses it to discover which payment gateways and banks are available per country before configuring a merchant.Ottu ticket: #135253.
This is an MCP tool, not a REST endpoint, so it is documented in a new "MCP Tools" developer section rather than under the auto-generated
docs/developers/apis/*OpenAPI pages.Pages added
developers/mcp-tools/index.mdx/mcp/connection, Bearer auth, per-tool permission model, and the shared{ "error": ... }result envelope.developers/mcp-tools/pg-capabilities.mdxget_pg_capabilitiesreference — permission, parameters, the three progressive-disclosure modes with real request/response examples, response schema (gateway profile / provider / wallet), enum reference tables, and error responses.Also adds a Pattern-B "MCP Tools" category to
developerSidebarinsidebars.ts(Overview + PG Capabilities), placed before Reference.Faithful to source
Every example payload is taken verbatim from the
core_backendtests (tests/test_contrib/test_mcp/test_mcp.py), so the docs match the tool's real output rather than a simplified spec. In particular:namefields are bilingual objects ({ "en": …, "ar": … }), e.g. MPGS renders as Credit/Debit Card — not the raw code.kw, ksa, om, bh, uae.gateway.view_pgmid; error messages match the service exactly.create_pg_configis intentionally not documented (held for #137821).Human display names are used in prose (Apple Pay, National Bank of Kuwait); raw codes appear in the schema/enum tables. No internal implementation, credentials, or code is exposed.
Verification
npm run typecheck— passes.npm run build— passes; the two new pages add no broken links or anchors (remaining build warnings are pre-existing on other pages).npm run serve+ Playwright: overview and tool pages render correctly, the Mermaid workflow diagram renders with the correct single-accent styling, code blocks are syntax-highlighted, and the sidebar/anchor navigation works.Base branch
Branched from
devand targetsdev(the repo's integration branch → staging). Retarget tomainif production-direct is preferred.